Skip to content

Conversation

StreetLamb
Copy link
Collaborator

@StreetLamb StreetLamb commented Sep 29, 2025

Summary by CodeRabbit

  • Documentation
    • Updated workflow-related code examples to use current import locations for public types across Advanced, Cloud Getting Started, Monitoring, Temporal, and Concepts sections.
    • Ensured consistent imports in all examples; no API changes required for users.
    • Added a missing datetime import in an advanced composition example.
    • Improves accuracy and reduces confusion when copying examples; no behavioral changes to the product.

@StreetLamb StreetLamb requested a review from saqadri September 29, 2025 13:41
Copy link

coderabbitai bot commented Sep 29, 2025

Walkthrough

Docs updated to change example imports of Workflow and WorkflowResult from mcp_agent.workflows to mcp_agent.executor.workflow across multiple pages. One page also adds a standard datetime import. No class/function signatures or control flow changed.

Changes

Cohort / File(s) Summary of Changes
Advanced Docs
docs/advanced/composition.mdx, docs/advanced/monitoring.mdx, docs/advanced/temporal.mdx
Updated example import paths to from mcp_agent.executor.workflow import Workflow, WorkflowResult; composition.mdx also adds import datetime. No logic changes.
Cloud Docs
docs/cloud/getting-started.mdx
Updated example imports to source Workflow, WorkflowResult from mcp_agent.executor.workflow.
Concepts Docs
docs/concepts/workflows.mdx
Updated example import declaration to mcp_agent.executor.workflow for Workflow, WorkflowResult.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Possibly related PRs

Suggested reviewers

  • saqadri
  • rholinshead

Poem

Hop hop! I tweak the trails, not code,
Paths rerouted where examples load.
Workflow’s burrow moved next door,
Executor’s warren—nothing more.
I stamp my paw, the docs aligned,
Carrots cached, imports refined.
🥕✨

Pre-merge checks and finishing touches

✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title Check ✅ Passed The provided title clearly and succinctly describes the core change in the pull request by indicating that documentation import paths for Workflow and WorkflowResult have been fixed. It is specific to the modifications made and follows conventional commit style without unnecessary details or noise, enabling any reviewer to immediately grasp the change’s intent.
Docstring Coverage ✅ Passed No functions found in the changes. Docstring coverage check skipped.
✨ Finishing touches
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch fix-docs-workflow-import

Tip

👮 Agentic pre-merge checks are now available in preview!

Pro plan users can now enable pre-merge checks in their settings to enforce checklists before merging PRs.

  • Built-in checks – Quickly apply ready-made checks to enforce title conventions, require pull request descriptions that follow templates, validate linked issues for compliance, and more.
  • Custom agentic checks – Define your own rules using CodeRabbit’s advanced agentic capabilities to enforce organization-specific policies and workflows. For example, you can instruct CodeRabbit’s agent to verify that API documentation is updated whenever API schema files are modified in a PR. Note: Upto 5 custom checks are currently allowed during the preview period. Pricing for this feature will be announced in a few weeks.

Please see the documentation for more information.

Example:

reviews:
  pre_merge_checks:
    custom_checks:
      - name: "Undocumented Breaking Changes"
        mode: "warning"
        instructions: |
          Pass/fail criteria: All breaking changes to public APIs, CLI flags, environment variables, configuration keys, database schemas, or HTTP/GraphQL endpoints must be documented in the "Breaking Change" section of the PR description and in CHANGELOG.md. Exclude purely internal or private changes (e.g., code not exported from package entry points or explicitly marked as internal).

Please share your feedback with us on this Discord post.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
docs/advanced/monitoring.mdx (1)

1596-1596: Fix encoding artifact in cost alert title

Same artifact as above; clean the string.

-    title: '=� LLM Cost Alert'
+    title: 'LLM Cost Alert'
🧹 Nitpick comments (1)
docs/advanced/composition.mdx (1)

40-40: Optional: prefer timezone-aware timestamps

Since the examples use timestamps (e.g., datetime.utcnow().isoformat() later), consider importing timezone and using datetime.now(timezone.utc).isoformat() for clarity.

-from datetime import datetime
+from datetime import datetime, timezone

Then, where applicable:

datetime.now(timezone.utc).isoformat()
📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 99b8840 and 8d76768.

📒 Files selected for processing (5)
  • docs/advanced/composition.mdx (1 hunks)
  • docs/advanced/monitoring.mdx (4 hunks)
  • docs/advanced/temporal.mdx (2 hunks)
  • docs/cloud/getting-started.mdx (1 hunks)
  • docs/concepts/workflows.mdx (1 hunks)
🧰 Additional context used
🧠 Learnings (3)
📓 Common learnings
Learnt from: rholinshead
PR: lastmile-ai/mcp-agent#414
File: src/mcp_agent/logging/logger.py:18-19
Timestamp: 2025-09-05T14:31:48.139Z
Learning: In the mcp-agent logging module (src/mcp_agent/logging/logger.py), temporalio should be imported lazily with try/except ImportError to avoid making it a hard dependency. Use temporalio.workflow.in_workflow() instead of isinstance checks on internal classes like _WorkflowInstanceImpl.
📚 Learning: 2025-07-22T18:59:49.368Z
Learnt from: CR
PR: lastmile-ai/mcp-agent#0
File: examples/usecases/reliable_conversation/CLAUDE.md:0-0
Timestamp: 2025-07-22T18:59:49.368Z
Learning: Applies to examples/usecases/reliable_conversation/examples/reliable_conversation/src/**/*.py : Use mcp-agent's Agent abstraction for ALL LLM interactions, including quality evaluation, to ensure consistent tool access, logging, and error handling.

Applied to files:

  • docs/cloud/getting-started.mdx
  • docs/advanced/monitoring.mdx
  • docs/advanced/temporal.mdx
  • docs/advanced/composition.mdx
📚 Learning: 2025-09-05T14:31:48.139Z
Learnt from: rholinshead
PR: lastmile-ai/mcp-agent#414
File: src/mcp_agent/logging/logger.py:18-19
Timestamp: 2025-09-05T14:31:48.139Z
Learning: In the mcp-agent logging module (src/mcp_agent/logging/logger.py), temporalio should be imported lazily with try/except ImportError to avoid making it a hard dependency. Use temporalio.workflow.in_workflow() instead of isinstance checks on internal classes like _WorkflowInstanceImpl.

Applied to files:

  • docs/advanced/monitoring.mdx
  • docs/advanced/temporal.mdx
  • docs/advanced/composition.mdx
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
  • GitHub Check: update_release_draft
🔇 Additional comments (6)
docs/advanced/temporal.mdx (2)

82-82: Consistent public import source

Updated import to mcp_agent.executor.workflow matches the rest of the PR; looks correct.


487-487: Second import update is also correct

Matches usage in the code block below; no further changes needed.

docs/advanced/composition.mdx (1)

37-37: Import path update is correct

Workflow/WorkflowResult reference updated to the canonical module; usage below type-checks in the examples.

docs/advanced/monitoring.mdx (1)

158-158: Import path fix matches PR goal

The updated import aligns with the rest of the docs changes.

docs/concepts/workflows.mdx (1)

27-27: Import update is correct

Matches the new public module for Workflow and WorkflowResult.

docs/cloud/getting-started.mdx (1)

133-133: Approve import path update
No remaining from mcp_agent.workflows import Workflow occurrences found across Python and documentation files; changes are approved.

slack_configs:
- channel: '#critical-alerts'
title: '=¨ CRITICAL: MCP Agent Alert'
title: '= CRITICAL: MCP Agent Alert'
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor

Remove stray non-ASCII/control characters in alert title

The title contains unexpected characters (=�). This will render poorly in docs.

-    title: '=� CRITICAL: MCP Agent Alert'
+    title: 'CRITICAL: MCP Agent Alert'
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
title: '=� CRITICAL: MCP Agent Alert'
title: 'CRITICAL: MCP Agent Alert'
🤖 Prompt for AI Agents
In docs/advanced/monitoring.mdx around line 1463, the alert title contains stray
non-ASCII/control characters ("=�") that will render poorly; remove those
characters and ensure the title contains only valid ASCII or intended Unicode
characters (e.g., change `title: '=� CRITICAL: MCP Agent Alert'` to `title:
'CRITICAL: MCP Agent Alert'` or the correct localized text), then save the file
and run a quick docs build or linter to verify no other control characters
remain.

await handler(alert)

print(f"=¨ ALERT: {alert.severity.value.upper()} - {alert.message}")
print(f"= ALERT: {alert.severity.value.upper()} - {alert.message}")
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor

Fix console print artifact

The printed prefix includes a stray character (=�). Use a plain ASCII prefix.

-            print(f"=� ALERT: {alert.severity.value.upper()} - {alert.message}")
+            print(f"ALERT: {alert.severity.value.upper()} - {alert.message}")
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
print(f"=� ALERT: {alert.severity.value.upper()} - {alert.message}")
print(f"ALERT: {alert.severity.value.upper()} - {alert.message}")
🤖 Prompt for AI Agents
In docs/advanced/monitoring.mdx around line 1636 the printed alert prefix
contains a stray non-ASCII character ("=�"); replace it with a plain ASCII
prefix (for example "=== ALERT:" or "ALERT:") so the print statement uses only
standard ASCII characters and reads clearly.

@StreetLamb StreetLamb merged commit 2ceeabb into main Sep 29, 2025
8 checks passed
@StreetLamb StreetLamb deleted the fix-docs-workflow-import branch September 29, 2025 14:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants